package com.itxckf.service.impl;

import com.itxckf.mapper.CartMapper;
import com.itxckf.pojo.Products;
import com.itxckf.service.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CartServiceImpl implements CartService {
    @Autowired
    private CartMapper cartMapper;
    @Override
    public void addCart(Short userID, Short productID) {
        cartMapper.addCart(userID,productID);
    }

    @Override
    public List<Products> getCart(Short userID) {
        return cartMapper.getCart(userID);
    }
}
